package com.topisv.tms.repository;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.BatchTask;

public interface BatchTaskDao extends JpaSpecificationExecutor<BatchTask>,
		PagingAndSortingRepository<BatchTask, Long> {
	/**
	 * 根据状态查询
	 * @param status
	 * @return
	 */
	List<BatchTask> findByStatus(String status);
	
	List<BatchTask> findByStatusAndJobuuid(String status,String jobuuid);
	
	List<BatchTask> findByStatusAndCustomerCode(String status,String customerCode);
	
	/**
	 * 根据时间周期查询
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<BatchTask> findByCreateDateBetween(Date startDate,Date endDate);
	
	/**
	 * 根据编号查询
	 * @param batchTaskCode
	 * @return
	 */
	BatchTask findByBatchTaskCode(String batchTaskCode);

}
